package com.truyen.service;

import java.util.List;

import com.truyen.persistence.entity.ChapterTruyenTrinhTham;
import com.truyen.persistence.entity.TruyenTrinhTham;
import com.truyen.utils.PagingInfo;


public interface ChapterTruyenTrinhThamService {
	
	// tao moi
	void save(ChapterTruyenTrinhTham entity);

	//tim theo id
	ChapterTruyenTrinhTham findById(Long id);

	//lay tat ca
	List<ChapterTruyenTrinhTham> getAll();

	//tim chapter theo column name
	ChapterTruyenTrinhTham findByProperty(String column, Object value);

	//lay danh sach chapter theo truyen va kw
	List<ChapterTruyenTrinhTham> getLstChapterByTruyen(TruyenTrinhTham entity,
			String kwSearch, String sort, String sortBy, PagingInfo pInfo);

	//tim chapter theo truyen va alias
	ChapterTruyenTrinhTham findAliasvTruyen(TruyenTrinhTham entity, String alias);

	//set is delete
	void setIsDelete(Long id);

	//lay tat ca danh sach chapter theo kw , theo noi dung null hoac khong, sap xep va phan trang
	List<ChapterTruyenTrinhTham> getLstAllChapterTruyen(String kwSearch, String sort, String sortBy, PagingInfo pInfo);

	//cap nhat lai chapter number
	void updateChapterNumber(Long id, float chapterNumberChange);

	//lay danh sach chapter theo truyen
	List<ChapterTruyenTrinhTham> getByTruyen(TruyenTrinhTham entity);

	//tim chapter theo truyen va chapter number
	ChapterTruyenTrinhTham getChapterByTruyenChapnumber(TruyenTrinhTham entity,	float chapterNumber);

	//xoa chapter truyen
	void delete(long id);
	
	//lay danh sach chapter moi
	List<ChapterTruyenTrinhTham> getListNewChapter(int maxLimit);

	//cap nhat chapter number cua truyen tranh tu blogtruyen
	void updateLstChapterNumberBlogTruyen();
	
	//cap nhat chapter truyen
	void update(Long id, Float chapterNumber, String content, boolean isDelete,	boolean isHot);

}
